#include "utility.h"

#include <QDesktopServices>
#include <QUrl>
#include <QFileInfo>


Utility::Utility()
{

}

bool Utility::openExplorer(const QString& path)
{
    QString url("file:///");
    url += path;

    return QDesktopServices::openUrl(QUrl(url, QUrl::TolerantMode));
}

QString Utility::getFileTitle(QString filepath)
{
    QFileInfo fileInfo(filepath);
    return fileInfo.baseName();
}
